package com.wlc.thread;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class ConnectionDemo {

	private Lock lock = new ReentrantLock();
	private Condition condition = lock.newCondition();	
	public void test(){
	    try{
	        lock.lock();
	        condition.await();	
	    }catch(Exception e){
	        e.printStackTrace();
	    }finally{
	        lock.unlock();
	    }
	}
}
